01-Print text to screen.py


Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...


Code Snippet

#printing text to the screen is easy - just use the print() command like shown below:

print("This will be printed to the screen")
print("And so will this")
print() #this will leave a space between the previous line printed and the next....
print("This line will have a space before it")
print()
print(""" Triple quotes are hugely useful..................

...........................They allow you to include long strings without having to keep using the print command
For instance, creating a main menu:
=====================MAIN MENU==========================

1...........Play Game
2.......... Save Scores
3.......... Quit

and finally, use triple quotes to quit!!

""")

                    

Try it yourself